package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 合同客户类型的枚举值
 */
@Getter
@AllArgsConstructor
public enum CustomerTypeEnum {
    /**
     * 个人客户
     */
    PERSONAL("personal","个人客户"),
    /**
     * 企业客户
     */
    COMPANY("company","企业客户");

    /**
     * 合同客户类型
     */
    private final String code;
    private final String msg;

    public static CustomerTypeEnum getByCode(String code) {
        for(CustomerTypeEnum e : CustomerTypeEnum.values()){
            if(e.code.equals(code)){
                return e;
            }
        }
        return null;
    }
}
